import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/view/Home'
import BlogDetail from '@/view/BlogDetail'
import Common from '@/view/Common'
import Animation from '@/view/Animation'
import Document from '@/view/Document'
import Introduction from '@/view/Introduction'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/blog',
    name: 'Blog',
    component: BlogDetail
  },
  {
    path: '/common/:id',
    name: 'Common',
    component: Common
  },
  {
    path: '/animations',
    name: 'Animation',
    component: Animation
  },
  {
    path: '/document',
    name: 'Document',
    component: Document
  },
  {
    path: '/introduction',
    name: 'Introduction',
    component: Introduction
  }
]

const router = new VueRouter({
  mode: 'history',
  // base: process.env.BASE_URL,
  routes
})

export default router